/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.tcr.entities;

import java.io.Serializable;

/**
 *
 * @author Sangre
 */
public class Commentaire implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;
    private String message;
    private boolean signale;
    private Utilisateur user;

    public Commentaire() {
    }

    public Commentaire(String message, Utilisateur u) {
        this.message = message;
        this.signale = false;
        this.user = u;
    }
    
    

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    /**
     * Get the value of message
     *
     * @return the value of message
     */
    public String getMessage() {
        return message;
    }

    /**
     * Set the value of message
     *
     * @param message new value of message
     */
    public void setMessage(String message) {
        this.message = message;
    }

    /**
     * Get the value of signale
     *
     * @return the value of signale
     */
    public boolean isSignale() {
        return signale;
    }

    /**
     * Set the value of signale
     *
     * @param signale new value of signale
     */
    public void setSignale(boolean signale) {
        this.signale = signale;
    }

    public Utilisateur getUser() {
        return user;
    }

    public void setUser(Utilisateur user) {
        this.user = user;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Commentaire)) {
            return false;
        }
        Commentaire other = (Commentaire) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.Commentaire[ id=" + id + " ]";
    }
}
